<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h2>1.双大括号表达式|插值</h2>
        <p>{{msg}}</p>
        <p>{{msg.toUpperCase()}}</p>

        <h2>2.指令一:强制绑定数据</h2><!--属性值是动态的时候-->
        <a href="url">百度</a>
        <a v-bind:href="url">百度</a>
        <a :href="url">百度</a>

        <h2>3.指令二:绑定事件监听</h2>
        <button v-on:click='test'>test1</button>
        <button @click='test'>test1</button>
     


        <!-- 监听/监视:回调函数 -->
    </div>
    <script src="../js/vue.js"></script>
    <script>
       new Vue({
           el:"#app",
           data:{
                msg:'i will back',
                url:'http://www.baidu.com'
           },
           methods: {
             test(event){
              alert(event.target.innerHTML)   
             }  
           }
       })
    </script>
</body>
</html>